<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>SYS_FS_MEDIA_FUNCTIONS Structure</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="generator" content="Doc-O-Matic" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <link rel="STYLESHEET" href="default.css" type="text/css" />

<script type="text/javascript" src="scripts.js"></script>
</head>
<body class="Element700" onload="onBodyLoadEx('frames.html', 'topic', '01060.html');" onmousedown="onBodyMouseDown();">

<!-- Begin Popups -->

<!-- End Popups -->

<!-- Begin Page Header -->
<div class="Element710" id="areafixed">
<div class="Element94">
<a href="01259.html" target="topic">System Service Libraries Help</a> &gt; <a href="00735.html" target="topic">File System Service Library Help</a> &gt; <a href="00736.html" target="topic">Library Interface</a> &gt; d) File System Data Types and Constants &gt; <a href="01060.html" target="topic">SYS_FS_MEDIA_FUNCTIONS Structure</a></div>
<div class="Element92">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="25%">
<div class="Element1">
MPLAB Harmony Core Help</div>
</td><td width="25%">
<div class="Element2">
<a href="contents.html" target="tocidx">Contents</a> | <a href="00007.html" target="topic">Home</a></div>
</td><td width="25%">
<div class="Element90">
<a href="01054.html" target="topic">Previous</a> | <a href="00736.html" target="topic">Up</a> | <a href="01090.html" target="topic">Next</a></div>
</td><td width="25%">
<div class="Element96">
<a href="mailto:docerrors@microchip.com&subject=MPLAB Harmony Documentation Feedback (Topic ID: SYS_FS_MEDIA_FUNCTIONS Topic Title: SYS_FS_MEDIA_FUNCTIONS Structure)&body=Thank you for your feedback! Please include a description of your feedback, and indicate whether you are reporting an an error in the documentation or an enhancement.">Documentation Feedback</a><br> <a href="http://support.microchip.com" target="_blank">Microchip Support</a></div>
</td></tr></table><div class="Element5">
SYS_FS_MEDIA_FUNCTIONS Structure</div>
</div>
</div>

<!-- End Page Header -->

<!-- Begin Client Area -->
<div class="Element720" id="areascroll">
<div class="Element721">

<!-- Begin Page Content -->
<a name="PageContent"></a><div class="Element58">
<a name="4465736372697074696F6E"></a><div class="Element11">
<div class="Element10">
<p class="Element10">
Media function pointers&nbsp;</p>
<p class="Element10">
This structure contains the definition for functions of media driver, which is registered with the media manager. In future, if any new driver needs to be registered with the media manager (say, to act as a media for file system), the new driver should have implemented all these functions.</p></div>
</div>
<a name="43"></a><div class="Element99">
C</div>
<div class="Element101"><div class="Element100"><pre class="Element100"><strong><span style="color: #000080">typedef</span></strong> <strong><span style="color: #000080">struct</span></strong> {
  <strong><span style="color: #000080">bool</span></strong> (* <strong><span style="color: #000000">mediaStatusGet</span></strong>)(<a href="00257.html" target="topic">DRV_HANDLE</a> handle);
  <a href="01073.html" target="topic">SYS_FS_MEDIA_GEOMETRY</a> * (* <strong><span style="color: #000000">mediaGeometryGet</span></strong>)(<strong><span style="color: #000080">const</span></strong> <a href="00257.html" target="topic">DRV_HANDLE</a> handle);
  <strong><span style="color: #000080">void</span></strong> (* <strong><span style="color: #000000">sectorRead</span></strong>)(<a href="00257.html" target="topic">DRV_HANDLE</a> clientHandle,<a href="01049.html" target="topic">SYS_FS_MEDIA_BLOCK_COMMAND_HANDLE</a> * commandHandle, <strong><span style="color: #000080">void</span></strong> * buffer, uint32_t blockStart, uint32_t nBlock);
  <strong><span style="color: #000080">void</span></strong> (* <strong><span style="color: #000000">sectorWrite</span></strong>)(<strong><span style="color: #000080">const</span></strong> <a href="00257.html" target="topic">DRV_HANDLE</a> handle,<a href="01049.html" target="topic">SYS_FS_MEDIA_BLOCK_COMMAND_HANDLE</a> * commandHandle, <strong><span style="color: #000080">void</span></strong> * sourceBuffer, uint32_t blockStart,uint32_t nBlock);
  <strong><span style="color: #000080">void</span></strong> (* <strong><span style="color: #000000">eventHandlerset</span></strong>)(<a href="00257.html" target="topic">DRV_HANDLE</a> handle, <strong><span style="color: #000080">const</span></strong> <strong><span style="color: #000080">void</span></strong> * eventHandler, <strong><span style="color: #000080">const</span></strong> uintptr_t context);
  <a href="01054.html" target="topic">SYS_FS_MEDIA_COMMAND_STATUS</a> (* <strong><span style="color: #000000">commandStatusGet</span></strong>)(<a href="00257.html" target="topic">DRV_HANDLE</a> handle, <a href="01049.html" target="topic">SYS_FS_MEDIA_BLOCK_COMMAND_HANDLE</a> commandHandle);
  <strong><span style="color: #000080">void</span></strong> (* <strong><span style="color: #000000">Read</span></strong>)(<a href="00257.html" target="topic">DRV_HANDLE</a> clientHandle,<a href="01049.html" target="topic">SYS_FS_MEDIA_BLOCK_COMMAND_HANDLE</a> * commandHandle, <strong><span style="color: #000080">void</span></strong> * buffer, uint32_t blockStart, uint32_t nBlock);
  uintptr_t (* <strong><span style="color: #000000">addressGet</span></strong>)(<strong><span style="color: #000080">const</span></strong> <a href="00257.html" target="topic">DRV_HANDLE</a> hClient);
  <strong><span style="color: #000080">void</span></strong> (* <strong><span style="color: #000000">erase</span></strong>)(<strong><span style="color: #000080">const</span></strong> <a href="00257.html" target="topic">DRV_HANDLE</a> handle,<a href="01049.html" target="topic">SYS_FS_MEDIA_BLOCK_COMMAND_HANDLE</a> * commandHandle, uint32_t blockStart,uint32_t nBlock);
  <a href="00257.html" target="topic">DRV_HANDLE</a> (* <strong><span style="color: #000000">open</span></strong>)(<a href="01183.html" target="topic">SYS_MODULE_INDEX</a> index, <a href="00289.html" target="topic">DRV_IO_INTENT</a> intent);
  <strong><span style="color: #000080">void</span></strong> (* <strong><span style="color: #000000">close</span></strong>)(<a href="00257.html" target="topic">DRV_HANDLE</a> client);
  <strong><span style="color: #000080">void</span></strong> (* <strong><span style="color: #000000">tasks</span></strong>)(<a href="01189.html" target="topic">SYS_MODULE_OBJ</a> obj);
} SYS_FS_MEDIA_FUNCTIONS;</pre></div></div>
<a name="4D656D62657273"></a><div class="Element14">
Members</div>
<div class="Element11">
<div class="Element10">
<div class="Element272">
<div class="TableDiv">
<table cellspacing="0" class="Table1">
<tr>
<td class="Element260" valign="top" width="35%">
<div class="Element261">
Members&nbsp;</div></td><td class="Element264" valign="top" width="65%">
<div class="Element265">
Description&nbsp;</div></td></tr><tr>
<td class="Element262" valign="top" width="35%">
<div class="Element263">
bool (* mediaStatusGet)(DRV_HANDLE handle);&nbsp;</div></td><td class="Element266" valign="top" width="65%">
<div class="Element267">
To obtains status of media&nbsp;</div></td></tr><tr>
<td class="Element262" valign="top" width="35%">
<div class="Element263">
SYS_FS_MEDIA_GEOMETRY * (* mediaGeometryGet)(const DRV_HANDLE handle);&nbsp;</div></td><td class="Element266" valign="top" width="65%">
<div class="Element267">
Function to get media geometry&nbsp;</div></td></tr><tr>
<td class="Element262" valign="top" width="35%">
<div class="Element263">
void (* sectorRead)(DRV_HANDLE clientHandle,SYS_FS_MEDIA_BLOCK_COMMAND_HANDLE * commandHandle, void * buffer, uint32_t blockStart, uint32_t nBlock);&nbsp;</div></td><td class="Element266" valign="top" width="65%">
<div class="Element267">
Function for sector read&nbsp;</div></td></tr><tr>
<td class="Element262" valign="top" width="35%">
<div class="Element263">
void (* sectorWrite)(const DRV_HANDLE handle,SYS_FS_MEDIA_BLOCK_COMMAND_HANDLE * commandHandle, void * sourceBuffer, uint32_t blockStart,uint32_t nBlock);&nbsp;</div></td><td class="Element266" valign="top" width="65%">
<div class="Element267">
Function for sector write&nbsp;</div></td></tr><tr>
<td class="Element262" valign="top" width="35%">
<div class="Element263">
void (* eventHandlerset)(DRV_HANDLE handle, const void * eventHandler, const uintptr_t context);&nbsp;</div></td><td class="Element266" valign="top" width="65%">
<div class="Element267">
Function register the event handler with media&nbsp;</div></td></tr><tr>
<td class="Element262" valign="top" width="35%">
<div class="Element263">
SYS_FS_MEDIA_COMMAND_STATUS (* commandStatusGet)(DRV_HANDLE handle, SYS_FS_MEDIA_BLOCK_COMMAND_HANDLE commandHandle);&nbsp;</div></td><td class="Element266" valign="top" width="65%">
<div class="Element267">
Function to obtain the command status&nbsp;</div></td></tr><tr>
<td class="Element262" valign="top" width="35%">
<div class="Element263">
void (* Read)(DRV_HANDLE clientHandle,SYS_FS_MEDIA_BLOCK_COMMAND_HANDLE * commandHandle, void * buffer, uint32_t blockStart, uint32_t nBlock);&nbsp;</div></td><td class="Element266" valign="top" width="65%">
<div class="Element267">
Function to read certain bytes from the media&nbsp;</div></td></tr><tr>
<td class="Element262" valign="top" width="35%">
<div class="Element263">
uintptr_t (* addressGet)(const DRV_HANDLE hClient);&nbsp;</div></td><td class="Element266" valign="top" width="65%">
<div class="Element267">
Function to obtain the address of the media (to be used for NVM only)&nbsp;</div></td></tr><tr>
<td class="Element262" valign="top" width="35%">
<div class="Element263">
DRV_HANDLE (* open)(SYS_MODULE_INDEX index, DRV_IO_INTENT intent);&nbsp;</div></td><td class="Element266" valign="top" width="65%">
<div class="Element267">
Function to open the media driver&nbsp;</div></td></tr><tr>
<td class="Element262" valign="top" width="35%">
<div class="Element263">
void (* close)(DRV_HANDLE client);&nbsp;</div></td><td class="Element266" valign="top" width="65%">
<div class="Element267">
Function to close the media&nbsp;</div></td></tr><tr>
<td class="Element262" valign="top" width="35%">
<div class="Element263">
void (* tasks)(SYS_MODULE_OBJ obj);&nbsp;</div></td><td class="Element266" valign="top" width="65%">
<div class="Element267">
Task function of the media&nbsp;</div></td></tr></table></div></div>
</div>
</div>
<a name="52656D61726B73"></a><div class="Element14">
Remarks</div>
<div class="Element11">
<div class="Element10">
<p class="Element10">
None.</p></div>
</div>
</div>
<!-- End Page Content -->

<!-- Begin Page Footer -->
<div class="Element95">
<a href="01259.html" target="topic">System Service Libraries Help</a> &gt; <a href="00735.html" target="topic">File System Service Library Help</a> &gt; <a href="00736.html" target="topic">Library Interface</a> &gt; d) File System Data Types and Constants &gt; <a href="01060.html" target="topic">SYS_FS_MEDIA_FUNCTIONS Structure</a></div>
<div class="Element93">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="25%">
<div class="Element3">
MPLAB Harmony Core Help</div>
</td><td width="25%">
<div class="Element4">
<a href="contents.html" target="tocidx">Contents</a> | <a href="00007.html" target="topic">Home</a></div>
</td><td width="25%">
<div class="Element91">
<a href="01054.html" target="topic">Previous</a> | <a href="00736.html" target="topic">Up</a> | <a href="01090.html" target="topic">Next</a></div>
</td><td width="25%">
<div class="Element97">
<a href="mailto:docerrors@microchip.com&subject=MPLAB Harmony Documentation Feedback (Topic ID: SYS_FS_MEDIA_FUNCTIONS Topic Title: SYS_FS_MEDIA_FUNCTIONS Structure)&body=Thank you for your feedback! Please include a description of your feedback, and indicate whether you are reporting an an error in the documentation or an enhancement.">Documentation Feedback</a><br> <a href="http://support.microchip.com" target="_blank">Microchip Support</a></div>
</td></tr></table></div>

<!-- End Page Footer -->
</div>
</div>

<!-- End Client Area -->
</body></html>